g_free (contents);
}
+/* Remove sequences that can be handled algorithmically,
+ * sequences with non-BMP keys, and sequences that produce
+ * empty strings.
+ */
static void
parser_remove_duplicates (GtkComposeParser *parser)
{
char buf[8] = { 0, };
gboolean remove_sequence = FALSE;
+ if (value[0] == '\0')
+ {
+ remove_sequence = TRUE;
+ goto next;
+ }
+
for (i = 0; i < MAX_COMPOSE_LEN + 1; i++)
keysyms[i] = 0;
break;
if (codepoint > 0xffff)
- remove_sequence = TRUE;
+ {
+ remove_sequence = TRUE;
+ goto next;
+ }
n_compose++;
}
remove_sequence = TRUE;
}
+next:
if (remove_sequence)
g_hash_table_iter_remove (&iter);
}
include "testsuite/gtk/compose/included" # see if this works
-<Multi_key> <s> <s> <s> : "!"
+<Multi_key> <s> <s> <s> : "!" # replace this entry
+<Multi_key> <a> <a> <a> : "" # remove this entry